Add HTTPClientError shortDescription property#583
Conversation
|
Can one of the admins verify this patch? |
6 similar comments
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
| return "HTTPClientError.\(String(describing: self.code))" | ||
| } | ||
|
|
||
| public var shortDescription: String { |
There was a problem hiding this comment.
Would you mind adding a comment that describes, when users should use shortDescription and what they need to take into consideration when adding another case?
There was a problem hiding this comment.
Added now. Happy to adjust the comments of course!
3a08807 to
0becaf9
Compare
fabianfett
left a comment
There was a problem hiding this comment.
One small change :) Since this is a public API change, let's get @Lukasa on here as well.
| } | ||
|
|
||
| /// Short description of the error that can be used in case a bounded set of error descriptions is expected, e.g. to | ||
| /// include in metric labels. The description does not contain associated values. |
There was a problem hiding this comment.
| /// include in metric labels. The description does not contain associated values. | |
| /// include in metric labels. For this reason the description must not contain associated values. |
There was a problem hiding this comment.
Updated. Do you still want to keep the in-code comment two lines down, saying essentially the same?
This adds a shortDescription property to HTTPClientError which provides a short description of the error without associated values.
0becaf9 to
5b0496f
Compare
|
@swift-server-bot test this please |
|
@swift-server-bot add to allowlist |
fabianfett
left a comment
There was a problem hiding this comment.
LGTM. Thanks! Let's wait for @Lukasa thumb though.
This adds a shortDescription property to HTTPClientError which provides a short
description of the error without associated values.
This is useful for e.g. metric labels which should not contain dynamic, potentially unbounded, associated values.